
export default {
    provide(){
        return {
            //顶级列表实例对象。
            topListVm:this
        }
    },
    methods:{
        /**
         * 切换全屏
         */
        toggleFullScreen(){
            const listContainer = this.$refs.current.$el;
            if (listContainer.classList.contains('fullscreen')) {
                listContainer.classList.remove('fullscreen');
            } else {
                listContainer.classList.add('fullscreen');
            }
        },
        /**
         * 是否全屏。
         * @returns {*}
         */
        isFullScreen(){
            const listContainer = this.$refs.current.$el;
            return listContainer.classList.contains('fullscreen');
        }
    }
}